//
//  FHStaticTool.m
//  FHStaticFramework
//
//  Created by leo on 2021/4/22.
//

#import "FHStaticTool.h"

@implementation FHStaticTool

+ (UIImage *)getImageInFramework {
    // 以下两种方式都可以
    //    UIImage *image = [UIImage imageNamed:@"static.png"];
    NSBundle *bundle = [NSBundle mainBundle];
    UIImage *image = [UIImage imageNamed:@"static.png" inBundle:bundle compatibleWithTraitCollection:nil];
    return image;
    
//    // 也可以加载其他bundle资源
//    NSString *bundlePath = [[NSBundle mainBundle] pathForResource:@"FHStaticFrameworkBundle.bundle" ofType:nil];
//    NSBundle *bundle = [NSBundle bundleWithPath:bundlePath];
//    UIImage *image = [UIImage imageNamed:@"static_bundle_01.png" inBundle:bundle compatibleWithTraitCollection:nil];
//    return image;
}

@end
